package com.gs.thunder.config.datasource;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * Created with IntelliJ IDEA.
 * User: Legolas
 * Date: 2017/7/17 0017
 */
public class DynamicDataSource extends AbstractRoutingDataSource {

    @Override
    protected Object determineCurrentLookupKey() {
       return DataSourceContextHolder.getDS();
    }

}